// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 11;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "A sign by the gravel path says, _Iron Mine. Claimed By Kranas._ The ground is dusty and bare, and ore has been piled by the side of the path. The breeze blows dust in your eyes.";
	text2 = "Not far ahead, you can see an encampment. Ro are working around a campfire, sorting through piles of jumbled, damaged equipment. When they see you, they shrug and return to their work. You sense that something has gone wrong here, and recently.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You reach the camp and get a good look at the miners. They are young Ro, with calloused hands and worn leather jerkins. Most of them ignore you. One woman, sitting by the fire, watches you quietly.";
	text2 = "From here, you can see why they are all out there. Their homes and workshops were to the northeast. Then sinkholes opened up underneath them. The buildings were either damaged beyond repair or swallowed by the earth.";
	text3 = "Oddly, you can see patches of green grass to the northeast. Even a few trees. An infection of life, cutting through this dead earth.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "You get close to the pits. They cut straight down through the earth, slicing through the tunnels of the mine. This mine hasn't been here for very long, and much of the Ro's work has been reduced to a ruin. In places, the dusty ground is spotty with lush, sweet-smelling grass.";
	text2 = "Happily, the ground here seems to be stable. You probably won't be eaten by the earth if you proceed.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "You walk out onto the lawn. A few trees protect you with welcome shade. The trees are mature, but they must have sprouted only recently. Some enchantment helped them rapidly grow and flourish.";
	text2 = "It is not beneficial magic, though. The ground shakes. The roots of the trees shift rapidly under the earth. Growing at an insane rate. Shooting out of the ground.";
	text3 = "The roots break off, twist into morbid parodies of the human form, and lurch toward you.";
	code =
		sf(this_town,4,1);
		if (gf(11,11) > 0) {
			rs(2); rs(3);
			}
			else {
				set_floor(0,53,10,0);
				set_floor(0,53,11,0);
				activate_hidden_group(1);
				}
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "The aggressive plant life you saw above-ground has also been shooting through these mines. Tufts of grass poke out of the earth, healthy despite the lack of sunlight. Lush vines crawl up the walls.";
	text2 = "It smells like a forest. It is pleasant and alien at the same time.";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "You reach the lowest level of the mine. Here, the shafts downward end in a floor of solid stone. To the west, you can see more floral horrors. Their roots have torn expanses of dirt out of the walls, creating little gardens for monsters.";
	text2 = "A bunch of root monsters are growing by the north wall. They are dormant, for now. Blobs of slime wiggle around at the edge of the pool to the west.";
	text3 = "Most notably, in an alcove in the south wall, you see a huge, twitching plant creature. It reminds you of the horrors of Sacramentum: A knot of vines, covered with long spines. When you approach, its flowers turn toward you.";
	text4 = "It has detected your presence, but it doesn't react.";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The Kranas miners are nervous when you approach. All attempts at conversation are met with suggestions that you talk to Danara.";
	text2 = "You note that the miners are always looking down at the ground, as if they are afraid plants will spring out of the earth and consume them.";
	text3 = "They seem much more at ease now. Not so much, of course, that they would ever thank you.";
	code =
		if (gf(11,11) > 0)
			rs(2);
			else rs(3);
	break;

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You didn't think these root creatures were able to talk. Then one of them spreads out its roots, opening a gap in its 'torso.' A loud, deafening screech emerges. It carries easily through the tunnels of the mine.";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "The stairway up ends at a trapdoor. You're unable to open it, probably because of the tons of timber and rubble piled on it.";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "With a spasmodic, lurching motion, the plant horror turns toward you. It can't move. Its roots are still planted firmly in the earth and stone. The room smells like you are in the middle of a pine forest in spring.";
	text2 = "It's not helpless, though. Some of its roots start to pull out of the ground and break loose. The water nearby starts to bubble, and bits of slime rise to the surface.";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "The plant horror convulses and slumps to the ground. The roots wither. Its bulk begins to collapse in upon itself. The smell of healthy growth is gone, replaced with rot and decay.";
	text2 = "The mine has been purged of its curse. Work can resume, providing quality iron for the Empire of Haven.";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "A blob of slime slithers up to the plant horror. A root juts out, plunges into the goo, and sucks it up. The slurping sound is disgusting. The giant creature is energized and restored.";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

//// Danara

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is a group of miners milling about this fire, looking for equipment to salvage. Their leader is a young woman in a rough leather jerkin. She, like all of her miners, is armed. Worn, serious weapons, not the ceremonial stuff the Gentle Coast uses.";
	text3 = "When you approach, the workers debate whether to welcome you. Finally, she says, _Might as well talk to them. Things can't be worse._ She approaches you. _I am Danara, of the Kranas Woods. This mine is our claim. Even if it is a disaster._";
	text5 = "Danara sits by the fire. The Kranas miners are not welcoming to you, but they aren't rude either. Danara doesn't offer you tea, but allows you to make your own.";
	text6 = "Your being a [P] is refreshingly and unnervingly unimportant to them.";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_You are from the Kranas Woods?_";
	text1 = "_I am. That is where my clan is. We take turns being forced to work in the Gentle Coast._ One of the miners spits in the dirt. _We have to tend to our claim, despite the sickness._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Tell me about the Kranas Woods._";
	text1 = "_It is to the northwest. Our forest is full of power. It protects us and gives us our duty. Even though it is sick, it was a pain to leave it for this dusty earth._";
	text2 = "_Then the sickness followed us._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Sickness?_";
	text1 = "_Look around. You will see._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_You don't care for the Gentle Coast._";
	text1 = "_It is a land of weaklings. They are not bad people, I suppose, but they are not Ro._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_How did you get this claim?_";
	text1 = "_We bought it three years ago. Some coasters had a large claim here. Our scouts saw there was iron. We gave them a fair offer. They took it. We did not even have to threaten a raid._";
	text2 = "_Maybe they knew that the roots were coming. Maybe this was a good trick on us._";
	
begintalknode;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "_It seems like you have had some problems here._";
	text1 = "_Yes. The sickness in the woods came here after us. This is a good claim. It has many years in it. The roots are taking it from us. Our buildings are lost to a sinkhole. The ground fell under them._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Why did the ground cave in?_";
	text1 = "_The hateful roots dug it away. They are reclaiming the land and making it green, but it is not caring, like our woods. It wants to kill. It is the spread of our curse._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_The curse spread?_";
	text1 = "_Outsiders have disrupted the Kranas Woods. It has happened before. The curse awakened, and it devours. Go to our home. You will see what you did._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(11,11) == 0;
	question = "_Maybe I can help with your curse._";
	text1 = "The miners have a brief, quiet, intense discussion. Danara returns. _You may enter the mine, if you wish. You invaders helped bring the curse. Maybe you can find a way to cut it out._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(11,11) > 0;
	question = "_Maybe I can help with your curse._";
	text1 = "_You have done all you can here. Now we want to be left alone to rebuild._";
	text2 = "_We will pay what we owe._";

begintalknode;
	state = 10;
	nextstate = 14;
	condition = gf(10,16) < 2;
	question = "_I need more iron._";
	text1 = "_We trade iron. Sending ore is how the Kranas earns its wealth without disrupting our woods. However, we can't work this claim. The roots have claimed it._";
	text2 = "_We have one who trades for us. You might convince her to send you our iron._";
	
begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_Who should I talk to?_";
	text1 = "_Her name is Ingrian. She is in Laskara now. Deal with her._";
	text2 = "You explain that Ingrian has already asked you to help her. She nods. _Good. I hope you succeed._";
	code =
		if (gf(10,16) != 1)
			rs(2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(11,11) == 1;
	question = "_I took care of your root monsters for you._";
	text1 = "You describe the battle to the miners. They don't take pleasure in the tale. Danara says, _You have only subjected our woods to more violence. We have our mine again, but the curse remains._";
	text2 = "_We should pay you for our help. Ingrian can pay you. She is in Laskara._";
	code =
		sf(11,11,2);
		if (gf(10,16) > 1)
			rs(2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(10,16) > 1;
	question = "_Haven has a claim on your iron._";
	text1 = "Danara nods. _We got the message from Ingrian. We are sending iron to [F0]. The Ro are true to our word. We will pay what we agreed._";
	text2 = "_Now leave us. We must work. There is much to repair._";
	action = END_TALK;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				